import random


def content():
    contents = "y"
    while True:
        if contents == "y":
            shu = int(input("请出拳(1:石头，2:剪刀，3:布)："))
            sui = random.randint(1, 3)

            if shu == sui:
                print(f"平局，你的招数：{shu},计算机的招数{sui}")
            elif (shu == 1 and sui == 2) or (shu == 2 and sui == 3) or (shu == 3 and sui == 1):
                print(f"你赢了，你的招数：{shu},计算机的招数{sui}")
            else:
                print(f"你输了，你的招数：{shu},计算机的招数{sui}")
        else:
            print("-" * 10 + "已结束" + "-" * 10)
            break
        contents = input("还想玩吗?,y/n：")


if __name__ == '__main__':
    print("-" * 10 + "猜拳游戏" + "-" * 10)
    content()
